package com.cl.mapper;

import com.cl.pojo.Notice;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
@Mapper
public interface NoticeMapper {
    /**
     * 插入一条公告
     * @param notice
     * @return
     */
    int insert(Notice notice);

    /**
     * 查询全部公告
     * @param time
     * @param page
     * @param limit
     * @return
     */
    List<Notice> queryAllNotice(@Param("time")String time,@Param("page")int page,@Param("limit")int limit);
    int countAll();

    /**
     * 修改
     * @param notice
     * @return
     */
    int modifyNotice(Notice notice);

    /**
     * 删除公告
     * @param nNo
     * @return
     */
    int deleteNotice(@Param("nNo")int nNo);

}
